let obj = screen.__proto__
let obj_text = "screen.__proto__"
let output_jscode = ""
let all_PropertyDescriptors = Object.getOwnPropertyDescriptors(obj)
for( let _obj_attribute in all_PropertyDescriptors){
    let Descriptors_text = "{"
    for (let _obj_attribute_descriptors in all_PropertyDescriptors[_obj_attribute]) {
        Descriptors_text += _obj_attribute_descriptors  // {set:
        Descriptors_text += ":"
        let Descriptors_detail  = all_PropertyDescriptors[_obj_attribute][_obj_attribute_descriptors]
        if(typeof Descriptors_detail === "function"){
            Descriptors_text += `function(){console.log("${obj_text} ${_obj_attribute} 描述符 ${_obj_attribute_descriptors} 被调用了")}`  // screen.__proto__ availWidth 描述符 get 被调用了
            // {set:function(){console.log()}
            Descriptors_text += ","
            // {set:function(){console.log()},
        }
        else if(typeof Descriptors_detail === "object"){
            Descriptors_text += `{}`  // screen.__proto__ availWidth 描述符 get 被调用了
            Descriptors_text += ","
        }
        else{
            Descriptors_text += Descriptors_detail  // screen.__proto__ availWidth 描述符 get 被调用了
            Descriptors_text += ","
        }
    }
    Descriptors_text += "}"
    // 设置描述符
    output_jscode += `Object.defineProperty(${obj_text}, "${_obj_attribute}", ${Descriptors_text});`
}

console.log(output_jscode)


